package com.example.mypro;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class BugaolanActivity extends Activity implements OnClickListener{

	private Button btnfind;
	private Button btnmiss;
	private Button btnjob;
	private Intent intent;
	private String xh;
	private String xm;
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_bugaolan);
	    btnmiss = (Button) findViewById(R.id.bgl_bn_miss);
	    btnjob = (Button) findViewById(R.id.bgl_bn_job);			
		btnfind = (Button) findViewById(R.id.bgl_bn_find);
		intent=getIntent();
		xh=intent.getStringExtra("xs_xh");
		xm=intent.getStringExtra("xs_xm");	
		System.out.println(xm);
		btnmiss.setOnClickListener(this);
		btnfind.setOnClickListener(this);
		btnjob.setOnClickListener(this);	
		}
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.bgl_bn_miss:	
			intent = new Intent(BugaolanActivity.this, MissActivity.class);
			intent.putExtra("xs_xh", xh);
			intent.putExtra("xs_xm", xm);
			startActivity(intent);
			break;
		case R.id.bgl_bn_job:			
			intent = new Intent(BugaolanActivity.this, JobActivity.class);
			intent.putExtra("xs_xh", xh);
			intent.putExtra("xs_xm", xm);
			startActivity(intent);
			break;
		case R.id.bgl_bn_find:
			intent = new Intent(BugaolanActivity.this, FindActivity.class);
			intent.putExtra("xs_xh", xh);
			intent.putExtra("xs_xm", xm);
			startActivity(intent);
			break;
		}
      }
	}
